package com.starnet.yarnmonitor.yarn.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

@Component
public class KafkaProducerUtil {

    @Autowired
    private KafkaTemplate<String, Object> kafkaTemplate;
    public void send(String topic,String msg){
        System.out.println(msg);
        kafkaTemplate.send(topic,msg);
    }

}
